<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        {{repData}}
    </div>
</body>
<script src="../node_modules/vue/dist/vue.js"></script>
<script src="../node_modules/axios/dist/axios.js"></script>
<script>
    new Vue({
        el: '#app',
        data: {
            repData: []
        },
        created() {
            axios.get('http://127.0.0.1:5500/vue-06-lifecycle/db.json').then(res => {
                console.info(res.data)
                this.repData = res.data
            }).catch(err=>{
                res => console.info("输出错误信息")
                console.log(err.message)
            })
        }
    })
</script>

</html>